Skip to content

Conversation

@kridai
Copy link
Contributor

@kridai kridai commented Dec 10, 2025

Fixes

A short description of what this PR does.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • Run make test-docker
  • Verify affected language according to the code change:
    • Generate twilio-java from our OpenAPI specification using the scripts/build_twilio_library.py using python scripts/build_twilio_library.py path/to/twilio-oai/spec/yaml path/to/twilio-java -l java and inspect the diff
    • Run make test in twilio-java
    • Create a pull request in twilio-java
    • Provide a link below to the pull request, this ensures that the generated code has been verified
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please create a GitHub Issue in this repository.

'{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/allParams}}
}){{/isApiV1}}{{^isApiV1}}{{#allParams}}
{{#startsWith paramName text='page_size'}}{{else}}{{paramName}}: Union[{{{dataType}}}, object] = values.unset,{{/startsWith}}{{/allParams}}
page_token: Union[str, object] = values.unset,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider the case when page_token, page_size params are present in the spec file too, like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}){{/isApiV1}}{{^isApiV1}}{{#allParams}}
{{#startsWith paramName text='page_size'}}{{else}}{{paramName}}: Union[{{{dataType}}}, object] = values.unset,{{/startsWith}}{{/allParams}}
page_token: Union[str, object] = values.unset,
page_number: Union[int, object] = values.unset,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In ApiV1, Page number is not present

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this case is for {{^isApiV1}} i.e existing functionality.

@kridai kridai merged commit 9f41a96 into twilio_api_standards_changes Jan 20, 2026
9 checks passed
@kridai kridai deleted the pyhon-pagination-support branch January 20, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants